#include <iostream>
using namespace std;
int main(){
    double A[60][10] = {};
    int a, b;
    double sum;
    cin >> a >> b;
    for (size_t i=0; i<a; i++){
        for (size_t j=0; j<b; j++){
            cin >> A[i][j];
        }
    }

    for (size_t i=0; i<b; i++){
        for (size_t j=0; j<a; j++){
            sum += A[j][i];
        }
        cout << (int) ( (sum / a) + 0.5);
        cout << "  ";
        sum = 0;
    }
}
